package day7;

/**
 * @author oldliu
 * @since 1.0
 */
public class Triangle extends Graphic {
    private double a,b,c;

    public Triangle(double a, double b, double c) {
        this.a = a;
        this.b = b;
        this.c = c;
    }

    @Override
    public double area() {
        double p=circle()/2;
        return Math.sqrt((p-a)*(p-b)*(p-c)*p);
    }

    @Override
    public double circle() {
        return a+b+c;
    }
}
